cmake_minimum_required(VERSION 3.25)
project(Obj_study2)

set(CMAKE_CXX_STANDARD 11)

add_executable(Obj_study2 main.cpp Object/Person.cpp Object/Person.h)

# 添加Object目录下的源文件
file(GLOB OBJECT_SOURCES "Object/*.cpp")
target_sources(Obj_study2 PRIVATE ${OBJECT_SOURCES})

# 包含头文件目录
target_include_directories(Obj_study2 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/Object)